// run: $exec < input
#include <cstring>
#include <iostream>
#include <algorithm>
const int maxn = 107;
int tm[maxn], pos[maxn];
int N, M, T;
const int dirx[] = {0, -1, 1, 0, 0};
const int diry[] = {0, 0, 0, -1, 1};
bool map[maxn][maxn][maxn];
bool vis[maxn][maxn][maxn];
bool mar[maxn][maxn][maxn];
bool dfs(int x, int y, int t){
	if(t == T + 1){
		return true;
	}
	bool mark = false;
	for(int i = 0; i < 5; i ++){
		int nx = x + dirx[i];
		int ny = y + diry[i];
		if(nx >= 1 && ny >= 1 && nx <= N && ny <= M && map[nx][ny][t + 1]){
			if(!vis[nx][ny][t + 1]){
				vis[nx][ny][t + 1] = 1;
				if(dfs(nx, ny , t + 1)){
					mar[nx][ny][t + 1] = mark = true;
 					tm[t + 1] ++; pos[t + 1] = (nx - 1) * M + ny - 1;
				}
			} else mark = mar[nx][ny][t + 1] == true ? true : mark;
		}
	}
	mar[x][y][t] = mark;
	return mark;
}
int main()
{
	int cas = 0, Q;
	std::ios::sync_with_stdio(false);
	while(std::cin >> N >> M >> T){
		if(N == 0 && M == 0 && T == 0) break;
		std::cin >> Q;
		int t, a, b, c, d;
		memset(tm, 0, sizeof(tm));
		memset(map, true, sizeof(map));
		memset(vis, 0, sizeof(vis));
		memset(mar, 0, sizeof(mar));
		for(int z = 1; z <= Q; z ++){
			std::cin >> t >> a >> b >> c >> d;
			for(int i = a; i <= c; i ++){
				for(int j = b; j <= d; j ++){
					map[i][j][t] = 0;
				}
			}
		}
		for(int i = 1; i <= N; i ++){
			for(int j = 1; j <= M; j ++){
				if(map[i][j][1]){
					vis[i][j][1] = 1;
					if(dfs(i, j, 1)){
						pos[1] = (i - 1)*M + j - 1;
						tm[1] ++;
					}
				}
			}
		}
		std::cout <<"Robbery #"<< ++ cas << ":\n";
		if(tm[T] == 0) {
			std::cout << "The robber has escaped.\n\n";
			continue;
		}
		bool mark = 0;
		for(int i = 1; i <= T; i ++){
			if(tm[i] == 1){
				mark = 1;
				int x = pos[i] / M + 1;
				int y = pos[i] % M + 1;
				std::cout << "Time step "<<i<<": The robber has been at "<<x<<", "<<y<<".\n";
			}
		}
		if(!mark){
			std::cout << "Nothing known.\n";
		}
		std::cout << '\n';
	}
	return 0;
}
